home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 December / PCWDEC06.iso / Software / Trial / Paint Shop Pro XI / Data1.cab / _434AE9FAFC0544398CA5426CF0EEE7CB < prev    next >
Encoding:
Text File  |  2006-08-04  |  1.7 KB  |  42 lines

  1. from PSPApp import *
  2.  
  3. def ScriptProperties():
  4.     return {
  5.         'Author': u'Corel Corporation',
  6.         'Copyright': u'Copyright (c) 2002-2006 Corel Corporation. All rights reserved.',
  7.         'Description': "Toggle between precise cursors and show brush outlines.",
  8.         'Host': u'Paint Shop Pro',
  9.         'Host Version': u'8.00'
  10.         }
  11.  
  12. def Do(Environment):
  13.     # start by getting the current set of preferences
  14.     CurrentPrefs = App.Do( Environment, 'ReturnGeneralPreferences' )
  15.  
  16.     # if brush outlines are on we will turn them off and turn on precise cursors.
  17.     if CurrentPrefs[ 'Display' ][ 'BrushOutlines' ] == App.Constants.Boolean.true:
  18.         print 'Turning brush outline on'
  19.         App.Do( Environment, 'GenPreferences', {
  20.                 'Display': {
  21.                     'PreciseCursors': App.Constants.Boolean.true, 
  22.                     'BrushOutlines': App.Constants.Boolean.false, 
  23.                     }, 
  24.                 'GeneralSettings': {
  25.                     'ExecutionMode': App.Constants.ExecutionMode.Silent, 
  26.                     'AutoActionMode': App.Constants.AutoActionMode.Match
  27.                     }
  28.                 })
  29.     else:   # if off then turn them on and turn precise off
  30.         print 'Turning brush outline off'
  31.         App.Do( Environment, 'GenPreferences', {
  32.                 'Display': {
  33.                     'PreciseCursors': App.Constants.Boolean.false, 
  34.                     'BrushOutlines': App.Constants.Boolean.true, 
  35.                     }, 
  36.                 'GeneralSettings': {
  37.                     'ExecutionMode': App.Constants.ExecutionMode.Silent, 
  38.                     'AutoActionMode': App.Constants.AutoActionMode.Match
  39.                     }
  40.                 })
  41.         
  42.